package com.cjl.dental_clinic.config;

import com.cjl.dental_clinic.Interceptor.JWTInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @description:
 * @author: cjl
 * @time: 2024/03/05 14:28
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new JWTInterceptor())
                // .excludePathPatterns("/cjl/user/login");
                .addPathPatterns("/cjl/user/")
                .excludePathPatterns("/user/**");
    }
}
